package eureka.domain.book;

import java.io.Serializable;

import net.sf.json.JSON;
import net.sf.json.JSONSerializer;

public class BookPicture implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private long bepID;
	private long beID;
	private String fileName;
	private String fileExt;
	
	public long getBepID() {
		return this.bepID;
	}
	public void setBepID(long bepID) {
		this.bepID = bepID;
	}

	public long getBeID() {
		return this.beID;
	}
	public void setBeID(long beID) {
		this.beID = beID;
	}

	public String getFileName() {
		return this.fileName;
	}
	public void setFileName(String fileName) {
		this.fileName = fileName;
	}

	public String getFileExt() {
		return this.fileExt;
	}
	public void setFileExt(String fileExt) {
		this.fileExt = fileExt;
	}

	public String getCompleteFileName() {
		return this.fileName + "." + this.fileExt;
	}
	
	public static BookPicture getDefaultEmpty() {
		BookPicture bp = new BookPicture();
		bp.bepID = 0;
		bp.beID = 0;
		bp.fileName = "";
		bp.fileExt = "";
		return bp;
	}
	
	public BookPicture() {
		this.bepID = 0;
		this.beID = 0;
		this.fileName = "";
		this.fileExt = "";
	}
    
    public JSON toJSON() {
    	return JSONSerializer.toJSON(this);
    }
}
